package com.song.cloud.sentinel.controller;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author ZhangGuisong
 * @Date 2021/3/1-22:33
 */
@RestController
public class RateController {
    @GetMapping("/testSentinel1")
    @SentinelResource(value="testSentinel1",blockHandlerClass=sentinelExcepotionHandler.class,blockHandler = "deal_handler1")
    public String testSentinel1(){
        return  "this is test method for solve big a problema1";
    }
    @GetMapping("/testSentinel")
    @SentinelResource(value="testSentinel",blockHandlerClass=sentinelExcepotionHandler.class,blockHandler = "deal_handler2")
    public String testSentine2(){
        return  "this is test method for solve big a problema2";
    }

}
